package org.zoomdev.zoom.web.rendering.impl;

import org.zoomdev.zoom.web.action.ActionContext;
import org.zoomdev.zoom.web.rendering.Rendering;
import org.zoomdev.zoom.web.view.Redirect;

public final class RedirectRendering implements Rendering {

    @Override
    public boolean render(ActionContext context) throws Exception {
        Object renderObject = context.getRenderObject();
        Redirect result = (Redirect) renderObject;
        context.getResponse().sendRedirect(result.getTo());
        return true;
    }


}
